import 'package:casdon/modules/device/data/api/ciot_product_category_api.dart';
import 'package:casdon/modules/device/data/api/ciot_product_model_api.dart';
import 'package:casdon/modules/device/data/api/nfc_check_bind_api.dart';
import 'package:casdon/modules/device/data/api/ciot_pairNet_guid_info_api.dart';
import 'package:casdon/modules/device/data/api/auth_login_with_third_user_info_api.dart';
import 'package:casdon/modules/device/data/api/ecology_openness_authenticate_api.dart';
import 'package:casdon/modules/device/data/api/scan_model_api.dart';

abstract class DeviceRepository {
  // 获取ciot产品类目
  Future<List<ResponseCiotProductCategoryApi>?> getCiotProductCategory();

  // 获取ciot对应产品类目的产品列表
  Future<List<ResponseCiotProductModelApi>?> getCiotProductModel({
    required String categoryId,
  });

  //检查nfc是否已绑定设备
  Future<ResponseNFCCheckBindApi?> getCheckNfcBind({
    required String virtualId,
    required String pid,
  });

  // 通过设备uuid 解绑nfc
  Future<Map<String, dynamic>?> delNfcUnBind({required String uuid});

  // 绑定nfc 设备
  Future<void> postNfcBind({
    required String deviceUuid,
    required String virtualId,
  });

  // nfc时进入产品说明页
  Future<Map<String, dynamic>> getNFCProductReadMeInfo({
    required String deviceId,
    required String pid,
  });

  // 获取ciot产品配网信息
  Future<List<CiotPairNetGuidInfo>> getCiotPairNetGuid(String pid);

  // ----------------- 天猫精灵涂鸦二合一二维码配网，绑定 -----------------

  // 天猫精灵 三方登录
  Future<AuthLoginWithThirdUserInfoModel?> getAliGenieAuthLogin({
    required String userId,
  });

  // 天猫精灵 生态开放认证
  Future<EcologyOpennessAuthenticateModel?> ecologyOpennessAuthenticate({
    required String loginStateAccessToken,
  });

  // 天猫精灵 绑定设备
  Future<void> bindDeviceWithThirdUserInfo({
    required String clientId,
    required String code,
  });

  // 天猫精灵 绑定设备 发送验证码
  Future<Map<String, dynamic>?> sendTMBindVerifyCode({
    required String sessionId,
    required String phoneNumber,
  });

  // 天猫精灵 绑定设备 获取用户列表
  Future<Map<String, dynamic>?> findTMUserListToAuthLoginWithPhoneNumber({
    required String code,
    required String phoneNumber,
    required String sessionId,
  });

  // 天猫精灵 扫码绑定
  Future<ScanModel?> scanCodeBind({
    required String userOpenId,
    required String clientId,
    required String code,
  });

  // 天猫精灵 账户绑定
  Future<EcologyOpennessAuthenticateModel?> authLoginWithTaoBaoUserInfo({
    required String loginStateAccessToken,
    required String sessionId,
  });

  // 淘宝 账户绑定
  Future<EcologyOpennessAuthenticateModel?> authLoginWithAliGenieUserInfo({
    required String loginStateAccessToken,
    required String sessionId,
  });
}
